/**
 * Copyright (C) 2018-2022
 * All rights reserved, Designed By www.dynread.com
 * 注意：
 * 本软件为www.dynread.com开发研制，项目使用请保留此说明
 */
package com.dynread.mall.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dynread.mall.dto.OrderCountDTO;
import com.dynread.mall.dto.OrderTimeDataDTO;
import com.dynread.mall.dto.PlaceOrderDTO;
import com.dynread.mall.entity.OrderInfo;

import java.io.Serializable;
import java.util.Map;

/**
 * 商城订单
 *
 * @author drinvay
 * @date 2022/5/7 9:38
 */
public interface OrderInfoService extends IService<OrderInfo> {

	IPage<OrderInfo> page1(IPage<OrderInfo> page, Wrapper<OrderInfo> queryWrapper);

	/**
	 * 下单
	 * @param placeOrderDTO
	 */
	OrderInfo orderSub(PlaceOrderDTO placeOrderDTO);

	IPage<OrderInfo> page2(IPage<OrderInfo> page, OrderInfo orderInfo);

	OrderInfo getById2(Serializable id);

	/**
	 * 取消订单
	 * @param orderInfo
	 */
	void orderCancel(OrderInfo orderInfo);
	/**
	 * 订单收货
	 * @param orderInfo
	 */
	void orderReceive(OrderInfo orderInfo);

	/**
	 * 处理订单回调
	 * @param orderInfo
	 */
	void notifyOrder(OrderInfo orderInfo);

	/**
	 * 根据商品分类统计订单占比
	 *
	 * @return com.dynread.mall.dto.OrderCountDTO
	 * @author drinvay
	 * @date 2022/5/7 15:01
	 */
	OrderCountDTO getOrderCount();

	/**
	 * 获取订单实时数据
	 *
	 * @return com.dynread.mall.dto.OrderTimeDataDTO
	 * @author drinvay
	 * @date 2022/5/7 9:51
	 */
	OrderTimeDataDTO getTimeData();

	/**
	 * 获取订单图表数据
	 *
	 * @return java.util.Map<java.lang.String,java.lang.Object>
	 * @author drinvay
	 * @date 2022/5/7 14:17
	 */
	Map<String, Object> getChartData();
}
